package org.hcyspartnoc.demo.controller.course;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.hcyspartnoc.demo.common.core.AjaxResult;
import org.hcyspartnoc.demo.common.core.annotation.Log;
import org.hcyspartnoc.demo.common.core.annotation.PreAuthorize;
import org.hcyspartnoc.demo.common.core.enums.BusinessType;
import org.hcyspartnoc.demo.pojo.dto.course.CourseInfoDto;
import org.hcyspartnoc.demo.pojo.vo.course.CourseListVo;
import org.hcyspartnoc.demo.pojo.vo.course.CourseTeamVo;
import org.hcyspartnoc.demo.pojo.vo.course.CourseVo;
import org.hcyspartnoc.demo.pojo.vo.course.TeacherListVo;
import org.hcyspartnoc.demo.service.course.ICourseService;
import org.hcyspartnoc.demo.service.course.ITeacherService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/teacher")
public class TeacherController {
    @Resource
    private ITeacherService teacherService;

    @Log(title = "教师·获取·教师·列表", businessType = BusinessType.OTHER, isSaveResponseData = false)
    @PreAuthorize(auth = "teacher:get:teacher:list", descr = "获取教师列表")
    @GetMapping("/get/list")
    public AjaxResult getTeacherList() {
        List<TeacherListVo> teacherListVos = teacherService.getTeacherList();
        return AjaxResult.success(teacherListVos);
    }

}
